<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="css/lib/bootstrap.min.css" />
		<script src="js/jquery.min.js"></script>
		<script src="js/lib/bootstrap.min.js"></script>
		<script src="js/lib/vue.min.js"></script>
		<script src="js/lib/vue-resource.js"></script>
		<script src="js/base.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<style>
		body{
			font-size:12px;
		}
		table,
		th,
		td {
			border: 1px solid grey;
			border-collapse: collapse;
			padding: 5px;
			vertical-align: middle !important;
		}		
		/*table td:nth-child(odd) {
			background-color: #f1f1f1;
			*/
		}
		table td:nth-child(even) {
			
		}
		table tr:nth-child(1) {
			background-color:#f1f1f1;
		}
		table tr:nth-child(4) {
			background-color:#f1f1f1;
		}
	</style>
	<body>
		<div class="" id="box" >		
		<div style="padding:15px 5px 0px 5px;border:3px solid #ccc;margin-bottom:15px">
			<table class="table table-hover">				
				<tbody>
					<tr>
						<th colspan="11">根据三级分销ID查询：</th>
					</tr>
					<tr>
						<td colspan="3">
								三级分销ID
						</td>
						<td colspan="8">
								<input id="text" type="text" class="form-control" style="width:280px;"/>
						</td>
					</tr>
					<tr>						
						<td colspan="11">
								<button v-on:click="cha()" class="btn btn-danger" style="display:block;margin:0 auto;">点击查看</button>  
						</td>										
					</tr>
					<tr class="text-center">
						<td>序号</td>
						<td>品牌编号</td>
						<td>ID</td>
						<td>名称</td>
						<td>级别</td>	
						<td>金额</td>
						<td>比率</td>
						<td>保证金</td>
						<td>折扣</td>
						<td>备注</td>
						<td>时间</td>
					</tr>
					<tr class="text-center">						
						<td>{{1}}</td>
						<td>{{i.brandId}}</td>
						<td>{{i.id}}</td>
						<td>{{i.name}}</td>
						<td>{{i.grade}}</td>
						<td>￥{{i.money}}</td>
						<td>{{i.rate}}%</td>
						<td>￥{{i.deposit}}</td>
						<td>{{i.discount}}</td>
						<td>{{i.remark}}</td>
						<td>{{i.createTime}}</td>
					</tr>
				</tbody>
			</table>		
		</div>
		
		</div>
	</body>
	<script>
		$(function(){
	new Vue({
				el:"#box",
				data:{
					i:[],
				},
				methods:{
					/*查看三级分销信息*/
					cha:function(){
						var id = $('#text').val();
						if(id!=""){
								this.$http.get(window.baseUrl+"user/thirdlevel/prod/query/"+id,{},{emulateJSON:true}).then( 
								   function (res) { 
								    console.log(res.data)
								    if(res.data.result.length<=0){
								    	alert("暂无下级会员")
								    }else{
								    	this.i = res.data.result
								    }
								    },function (res) { 
								   	   alert("查询失败")
								    } 
								  );
						}else{
							    alert("请完善输入信息！")
						}
						
					},
				}
			})			
		})
	</script>
</html>

